home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Selection / Multimedia Selection Volume One - CD-ROM / MULTIMEDIA SELECTION____________.ISO / utils / ready51 / ready.doc < prev    next >
Encoding:
Text File  |  1993-04-27  |  7.7 KB  |  150 lines

  1. ╒═══════════════════════════════════════════════════════════════════════════╕
  2. │        CADMOS Computer WorkShop - 26, Skoufa Street, Athens 106 73        │
  3. │     Phone +30-1- data: 363 5482, 360 6044, 360 6046 (Cadmos/CHAOS BBS)    │
  4. │               voice: 361 1030, 360 6052       FAX: 360 6059               │
  5. ╘═══════════════════════════════════════════════════════════════════════════╛
  6.  
  7. READY, Version 5.1, (c) 1989-93, Haris Courouclis, (301) 361 1030
  8. ─────────────────────────────────────────────────────────────────
  9.  
  10. FORMAT:  READY [options][message]
  11.  
  12. Options are:
  13.   /A:n    Only Accept characters n or ASCII code n
  14.   /A      Set ErrorLevel to Ascii value of key pressed (used with /A:n)
  15.   /B      Retain keypress in type Buffer (/A switch disregarded)
  16.   /C      Display Clock
  17.   /K      Keep message line
  18.   /N      No message
  19.   /R      Message Right justified
  20.   /Red    Allow output Redirection (F.e. READY /red >COM1 <COM1)
  21.   /S:n    Sound a n Hz beep or delay n msecs (when n<0)
  22.   /T:n    Wait n secs for key
  23.   /Z      Zap keyboard buffer on entry.
  24.  
  25. READY displays MESSAGE and waits for a keypress.
  26.  
  27. To insert special characters (such as the redir. chars <, >, and |), use
  28. \nnn or \$nn within message, where \nnn is a three digit decimal Ascii
  29. code while \$nn is a HEX value.
  30.  
  31. Default MESSAGE is 'hh:mm:ss  Press any key when ready ...'
  32.  
  33. The message line is cleared unless the /K parameter is supplied.
  34.  
  35. The Ascii Code for the key pressed is recorded in ERRORLEVEL (255 if /B).
  36.  
  37. If /A:n is specified only keypress with ASCII code n or letters in keylist
  38. n are accepted. Use -n for Extended Ascii (for example, /A:bC for b and C,
  39. /A:-59 for F1). The ErrorLevel is set to the order of the key pressed
  40. within the keylist. If /A is specified along with /A:n, then the ErrorLevel
  41. is set to the Ascii Code of the key pressed.
  42.  
  43. If /T:n is specified and no key has been pressed for n seconds, then 0 is
  44. returned to ERRORLEVEL.  If /Red is specified then I/O can be redirected
  45. from CON to another device (Note: /C can not be used with /RED).
  46.  
  47. Example:
  48. (a) print file if y, Y, Space or Enter is pressed, don't print
  49.     if Ctrl-C, Esc, n or N is pressed:
  50.  
  51.   READY Do you want a printout (Y/N)? \060Y\062: /a:3 /a:27 /a:nNyY /a:13 /a:32
  52.   if ErrorLevel 5 goto PRINT           ───┬────
  53.   goto END                                │
  54.                                           │
  55.   :PRINT                                  │
  56.   print test.xyz                          │
  57.                                           │
  58.   :END                         this will show up as  <S>:
  59.  
  60.  
  61. (b) print file if any key but Ctrl-C, Esc, n or N is pressed:
  62.  
  63.   READY Do you want a printout (Y/N)? \060Y\062:
  64.   if ErrorLevel 3 if not ErrorLevel 4 goto END
  65.   if ErrorLevel 27 if not ErrorLevel 28 goto END
  66.   if ErrorLevel 78 if not ErrorLevel 79 goto END
  67.   if ErrorLevel 110 if not ErrorLevel 111 goto END
  68.   print test.xyz
  69.  
  70.   :END
  71.  
  72. ┌───────────────────────────────────────────────────────────────────────────┐
  73. │(c) All rights reserved. Use prohibited in a professional, business or     │
  74. │    commercial environment without prior written licence by the author.    │
  75. │                                                                           │
  76. │ Feel free to copy and distribute this program. You may use it and evaluate│
  77. │ it for 30 days. After this period, you may only use it while you are a    │
  78. │ subscriber to Cadmos/CHAOS BBS :-)                                        │
  79. └───────────────────────────────────────────────────────────────────────────┘
  80.  
  81. Version History Notes:
  82.  
  83. ver 1.0  First attempt, early '89.
  84. ver 2.0  Added colors, and clock display
  85. ver 2.1  Option keywords can be mixed with message words
  86. ver 2.1a Help can be invoked with /? as well as ?
  87. ver 2.2  When /n (No message) then do not display time either
  88. ver 3.0  21.09.90 ReplaceAscii added for \nnn ASCII characters
  89. ver 3.1  05.10.90 Added BREAK handling
  90. ver 3.1a 08.10.90 Write ^C instead of chr(3)
  91. ver 3.1b 16.10.90 ErrorLevel 255 if /B
  92. ver 3.1c 23.02.91 minor HELP correction
  93. ver 3.1d 12.03.91 Played with color! (message color was unpredictable)
  94. ver 3.2  14.07.91 Allow Input/Output redirection
  95. ver 3.3  31.03.92 READY would limit the parameter line to 79 characters.
  96.          Although this is desirable, the various parameters where also counted
  97.          so the resulting string was often limited to much less characters.
  98.          Now there is a limit of 78 characters for the resulting prompt string
  99.          ONLY when the /r switch is in effect.
  100. ver 3.4  19.04.92 Fixed the color restoration bug
  101. ver 3.4a 17.11.92 Added Cadmos/Chaos numbers in HELP
  102. ver 3.4b 26.12.92 Added TimeOut info if DEBUG=ready
  103. ver 3.5  27.12.92 Changed TimeStart and TimeEnd calculation.
  104.          60*60*100*Word produced erroneous results.
  105. ver 4.0  Same as ver 3.5. The major version digit (4) should have been
  106.          increased since ver 3.5 was a "major bug fix"! Versions prior to
  107.          3.5 did not, at times, calculate correctly start and present time
  108.          when the /t:n parameter was used. In some cases the timeout value
  109.          was never reached.
  110.             This was due to a Turbo Pascal bug: when a number variable is
  111.          assigned to an expression that involves another variable of lesser
  112.          capacity, the result is bound by the capacity of the lesser
  113.          variable. In READY's case, a TimeOut word variable was calculated
  114.          as the difference of EndTime-StartTime, both LongInt variables.
  115.          Those variables where calculated as 60*60*100*Hour + 60*100*Min +
  116.          100*Sec + Sec100.
  117.             Hour, Min, Sec and Sec100 get their values from the GetTime
  118.          procedure and are defined ss Word variables. The 60*60*100 was
  119.          bound by the Word variable limits and, as a result, the StartTime
  120.          and EndTime values were wrong. In most of the cases the
  121.          EndTime-StartTime difference was correct, but, in some cases, it
  122.          yielded an erroneous value. In those cases Ready /s:n would not
  123.          work properly. This was corrected in Version 4.0 (3.5).
  124. ver 4.1  Added the /Z parameter. When used, the keyboard buffer is cleared
  125.          before from any characters that might have been left there before
  126.          READY's prompt appears.
  127. ver 5.0  When a keylist is specified (with /A:n) the ErrorLevel is now set
  128.          to the order of the key pressed within the keylist. If the new
  129.          switch /A is specified along with /A:n, then the ErrorLevel is set
  130.          to the Ascii Code of the key pressed, just as it did in previous
  131.          versions.
  132.     *>│> WARNING: Since the ErrorLevel is now set by default to the order
  133.       └─────────  of the keypressed within the keylist, you will have to
  134.                   edit any batch files using the /A:n option that you might
  135.                   have written using older versions of READY. A QUICK WAY
  136.                   OF DOING THIS IS TO USE THE /A SWITCH WHENEVER THE
  137.                   READY /A:n OPTION IS USED.
  138. ver 5.1  BugFix: the character corresponding to the returned ErrorLevel was
  139.          printed instead of the key pressed!
  140.  
  141.  
  142. ┌────────────────────────────────────────────────────────────────────────────┐
  143. │(c) All rights reserved. Use prohibited in a professional, business or      │
  144. │    commercial environment without prior written licence by the author.     │
  145. │                                                                            │
  146. │ Feel free to copy and distribute this program. You may use it and evaluate │
  147. │ it for 30 days. After this period, you may only use it while you are a     │
  148. │ subscriber to Cadmos/CHAOS BBS :-)                                         │
  149. └────────────────────────────────────────────────────────────────────────────┘
  150.